import Vue from 'vue';
import App from './App.vue';
import store from './store';
import router from './router';
import plugins from "@/utils/plugins";
import thirdParty from '@/utils/thirdparty';

import 'element-ui/lib/theme-chalk/descriptions.css';
import 'element-ui/lib/theme-chalk/display.css';
import '@/assets/font/index.css';
import '@/styles/index.scss';

//加载项目基本配置
import '@/utils/config';

//加载SVG图标
import '@/assets/icons';

Vue.config.productionTip = false;
//第三方组件引入
Vue.use(thirdParty);

//全局组件、方法、过滤器、指令
Vue.use(plugins);

new Vue({
	store,
	router,
	async beforeCreate() {
		await this.$store.dispatch('init');
		Vue.prototype.$bus = this;
		this.$mount('#app');
	},
	render: h => h(App)
})